<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="button" value="按钮" onclick="f1()">
<script>
  function f1() {
    console.log("f1")
  }
  f1();
  function f2(name,age) {
    console.log(name+":"+age)
  }
  f2("刘备",22);
  function f3() {
    return "返回值";
  }
  let info = f3();
  console.log(info);

  function f4(x,y) {
    return x+y;
  }
  let result = f4(2,6);
  console.log(result);

  let f5 = function (name,age) {
    console.log(name+":"+age)
  }
  f5("关羽",22);

  let f6 = new Function("name","age","console.log(name+':'+age)");
  f6("张飞",22)

</script>
</body>
</html>